<!DOCTYPE html>
            
<HTML>
<HEAD>
<meta name="booktitle" content="Developing Applications With Objective Caml" >
 <meta charset="ISO-8859-1"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<META name="GENERATOR" content="hevea 1.05-7 of 2000-02-24">
<META NAME="Author" CONTENT="Christian.Queinnec@lip6.fr">
<LINK rel=stylesheet type="text/css" href="videoc-ocda.css">
<script language="JavaScript" src="videoc.js"><!--
//--></script>
<TITLE>
 Chapter outline
</TITLE>
</HEAD>
<BODY class="regularBody">
<A HREF="book-ora112.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora114.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2>Chapter outline</H2>
This chapter introduces the tools that allow interoperability between
Objective CAML and C by building executables containing code fragments
written in both languages. These tools include functions to convert
between the data representations of each language, allocation functions
using the Objective CAML heap and garbage collector, and functions to raise
Objective CAML exceptions from C.<BR>
<BR>
The first section shows how to call C functions from Objective CAML and how
to build executables and interactive toplevel interpreters including the C code
implementing those functions. The second section explores the C
representation of Objective CAML values. The third section explains how to
create and modify Objective CAML values from C. It discusses the
interactions between C allocations and the Objective CAML garbage collector,
and presents the mechanisms ensuring safe allocation from C. The
fourth section describes exception handling: how to raise exceptions
and how to handle them. The fifth section reverses the roles: it
shows how to include Objective CAML code in an application whose main program is written in C.<BR>
<BR>


<H3> Note </H3> <HR>

This chapter assumes a working knowledge of the C language. Moreover,
reading chapter <A HREF="index.html#chap-GC">9</A> can be helpful in understanding the issues raised by
automatic memory management.


<HR>

<BR>
<BR>
<HR>
<A HREF="book-ora112.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora114.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
